package com.nameli.admin.service.impl;

import com.nameli.SIM.bean.entity.TeacherInfo;
import com.nameli.SIM.mapper.TeacherInfoMapper;
import com.nameli.SIM.util.EmptyUtil;
import com.nameli.admin.service.TechService;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @author NAME-L
 * @Description 教师 serviceImpl
 * @className TechServiceImpl
 * @date 2021-11-05 10:54:25
 */
@Component
public class TechServiceImpl implements TechService {

    private static final Log log = LogFactory.getLog(TechServiceImpl.class);

    @Autowired
    private TeacherInfoMapper teacherInfoMapper;

    @Override
    public List<TeacherInfo> queryByTechPosition(Integer techPosition) {
        log.info("enter into -----------> TechServiceImpl - queryByTechPosition");
        List<TeacherInfo> infoList = teacherInfoMapper.queryByTechPosition(techPosition);
        log.info("techPosition:"+techPosition);
        if(infoList.size()!=0 && infoList.size()>0 && EmptyUtil.isNotEmpty(techPosition)){
            log.info("查询教师信息集合成功！");
            return infoList;
        }else {
            log.info("查询的教师信息集合为空");
        }
        return null;
    }
}
